home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / kit internet / e-mail / yam2.0 / rexx / handlelha.yam < prev    next >
Text File  |  1999-03-06  |  820b  |  21 lines

  1. /* HandleLHA.yam - View or extract attached LhA files in YAM  */
  2. /* Create a new MIME viewer with the following settings:      */
  3. /* Attachment type = application/x-lha                        */
  4. /* Extension       = lha                                      */
  5. /* Viewer          = rx YAM:rexx/HandleLHA.yam %s             */
  6. /* LhA and RX must be in your AmigaDOS search path            */
  7.  
  8. PARSE ARG filename
  9. ADDRESS YAM
  10. OPTIONS RESULTS
  11. 'Request BODY "What shall I do with this archive?" GADGETS "View contents|Extract files|Cancel"'
  12. IF RESULT=1 THEN DO
  13.   ADDRESS COMMAND 'LhA >CON:////HandleLhA/WAIT/CLOSE v 'filename
  14. END
  15. ELSE IF RESULT=2 THEN DO
  16.   'RequestString BODY "Enter the destination directory:" STRING "RAM:"'
  17.   IF RC=0 THEN DO
  18.     ADDRESS COMMAND 'LhA >CON:////HandleLhA/CLOSE x 'filename' 'RESULT
  19.   END
  20. END
  21.